3.11.5 \(\int x^2 (1-a x)^{-1-\frac {1}{2} n (1+n)} (1+a x)^{-1-\frac {1}{2} (-1+n) n} \, dx\) [1005]

Optimal. Leaf size=54 \[ \frac {(1-a x)^{-\frac {1}{2} n (1+n)} (1+a x)^{\frac {1}{2} (1-n) n} (1-a n x)}{a^3 n \left (1-n^2\right )} \]

[Out]

(a*x+1)^(1/2*(1-n)*n)*(-a*n*x+1)/a^3/n/(-n^2+1)/((-a*x+1)^(1/2*n*(1+n)))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.027, Rules used = {82} \begin {gather*} \frac {(1-a x)^{-\frac {1}{2} n (n+1)} (a x+1)^{\frac {1}{2} (1-n) n} (1-a n x)}{a^3 n \left (1-n^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(1 - a*x)^(-1 - (n*(1 + n))/2)*(1 + a*x)^(-1 - ((-1 + n)*n)/2),x]

[Out]

((1 + a*x)^(((1 - n)*n)/2)*(1 - a*n*x))/(a^3*n*(1 - n^2)*(1 - a*x)^((n*(1 + n))/2))

Rule 82

Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x
)^(n + 1)*(e + f*x)^(p + 1)*((2*a*d*f*(n + p + 3) - b*(d*e*(n + 2) + c*f*(p + 2)) + b*d*f*(n + p + 2)*x)/(d^2*
f^2*(n + p + 2)*(n + p + 3))), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0] && NeQ[n + p + 3,
 0] && EqQ[d*f*(n + p + 2)*(a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1)))) - b*(d*e*(n + 1)
+ c*f*(p + 1))*(a*d*f*(n + p + 4) - b*(d*e*(n + 2) + c*f*(p + 2))), 0]

Rubi steps

\begin {align*} \int x^2 (1-a x)^{-1-\frac {1}{2} n (1+n)} (1+a x)^{-1-\frac {1}{2} (-1+n) n} \, dx &=\frac {(1-a x)^{-\frac {1}{2} n (1+n)} (1+a x)^{\frac {1}{2} (1-n) n} (1-a n x)}{a^3 n \left (1-n^2\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 49, normalized size = 0.91 \begin {gather*} \frac {(1-a x)^{-\frac {1}{2} n (1+n)} (1+a x)^{-\frac {1}{2} (-1+n) n} (-1+a n x)}{a^3 n \left (-1+n^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(1 - a*x)^(-1 - (n*(1 + n))/2)*(1 + a*x)^(-1 - ((-1 + n)*n)/2),x]

[Out]

(-1 + a*n*x)/(a^3*n*(-1 + n^2)*(1 - a*x)^((n*(1 + n))/2)*(1 + a*x)^(((-1 + n)*n)/2))

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 52, normalized size = 0.96

method result size
gosper \(\frac {\left (a x +1\right )^{-\frac {1}{2} n^{2}+\frac {1}{2} n} \left (a n x -1\right ) \left (-a x +1\right )^{-\frac {1}{2} n^{2}-\frac {1}{2} n}}{a^{3} n \left (n^{2}-1\right )}\) \(52\)
risch \(-\frac {\left (-a x +1\right )^{-1-\frac {1}{2} n^{2}-\frac {1}{2} n} \left (a^{3} x^{3} n -a^{2} x^{2}-a n x +1\right ) \left (a x +1\right )^{-1-\frac {1}{2} n^{2}+\frac {1}{2} n}}{n \left (n^{2}-1\right ) a^{3}}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(-a*x+1)^(-1-1/2*n*(1+n))*(a*x+1)^(-1-1/2*(-1+n)*n),x,method=_RETURNVERBOSE)

[Out]

(a*x+1)^(-1/2*n^2+1/2*n)*(a*n*x-1)*(-a*x+1)^(-1/2*n^2-1/2*n)/a^3/n/(n^2-1)

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 63, normalized size = 1.17 \begin {gather*} \frac {{\left (a n x - 1\right )} e^{\left (-\frac {1}{2} \, n^{2} \log \left (a x + 1\right ) - \frac {1}{2} \, n^{2} \log \left (-a x + 1\right ) + \frac {1}{2} \, n \log \left (a x + 1\right ) - \frac {1}{2} \, n \log \left (-a x + 1\right )\right )}}{{\left (n^{3} - n\right )} a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-a*x+1)^(-1-1/2*n*(1+n))*(a*x+1)^(-1-1/2*(-1+n)*n),x, algorithm="maxima")

[Out]

(a*n*x - 1)*e^(-1/2*n^2*log(a*x + 1) - 1/2*n^2*log(-a*x + 1) + 1/2*n*log(a*x + 1) - 1/2*n*log(-a*x + 1))/((n^3
 - n)*a^3)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 74, normalized size = 1.37 \begin {gather*} -\frac {{\left (a^{3} n x^{3} - a^{2} x^{2} - a n x + 1\right )} {\left (a x + 1\right )}^{-\frac {1}{2} \, n^{2} + \frac {1}{2} \, n - 1} {\left (-a x + 1\right )}^{-\frac {1}{2} \, n^{2} - \frac {1}{2} \, n - 1}}{a^{3} n^{3} - a^{3} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-a*x+1)^(-1-1/2*n*(1+n))*(a*x+1)^(-1-1/2*(-1+n)*n),x, algorithm="fricas")

[Out]

-(a^3*n*x^3 - a^2*x^2 - a*n*x + 1)*(a*x + 1)^(-1/2*n^2 + 1/2*n - 1)*(-a*x + 1)^(-1/2*n^2 - 1/2*n - 1)/(a^3*n^3
 - a^3*n)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(-a*x+1)**(-1-1/2*n*(1+n))*(a*x+1)**(-1-1/2*(-1+n)*n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-a*x+1)^(-1-1/2*n*(1+n))*(a*x+1)^(-1-1/2*(-1+n)*n),x, algorithm="giac")

[Out]

integrate((a*x + 1)^(-1/2*(n - 1)*n - 1)*(-a*x + 1)^(-1/2*(n + 1)*n - 1)*x^2, x)

________________________________________________________________________________________

Mupad [B]
time = 1.31, size = 140, normalized size = 2.59 \begin {gather*} -\frac {\frac {x^3}{\left (n^2-1\right )\,{\left (a\,x+1\right )}^{\frac {n\,\left (n-1\right )}{2}+1}}-\frac {x}{a^2\,\left (n^2-1\right )\,{\left (a\,x+1\right )}^{\frac {n\,\left (n-1\right )}{2}+1}}+\frac {1}{a^3\,n\,\left (n^2-1\right )\,{\left (a\,x+1\right )}^{\frac {n\,\left (n-1\right )}{2}+1}}-\frac {x^2}{a\,n\,\left (n^2-1\right )\,{\left (a\,x+1\right )}^{\frac {n\,\left (n-1\right )}{2}+1}}}{{\left (1-a\,x\right )}^{\frac {n\,\left (n+1\right )}{2}+1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/((1 - a*x)^((n*(n + 1))/2 + 1)*(a*x + 1)^((n*(n - 1))/2 + 1)),x)

[Out]

-(x^3/((n^2 - 1)*(a*x + 1)^((n*(n - 1))/2 + 1)) - x/(a^2*(n^2 - 1)*(a*x + 1)^((n*(n - 1))/2 + 1)) + 1/(a^3*n*(
n^2 - 1)*(a*x + 1)^((n*(n - 1))/2 + 1)) - x^2/(a*n*(n^2 - 1)*(a*x + 1)^((n*(n - 1))/2 + 1)))/(1 - a*x)^((n*(n
+ 1))/2 + 1)

________________________________________________________________________________________